<?php
class imageApiControl extends skymvc{
	
	public function __construct(){
		parent::__construct();
	}
	/**
	增加水印
	
	$config=array(
		"dstimg"=>"要打水印的图片",
		"warterpos"=>"打水印的位置",
		"img"=>"水印图片",
		"str"=>"水印文字"
		"size"=>文字大小,
		"font"=>"字体文件",
		"color"=>"文字颜色",
		"type"=>""0图片还是1文字
	)
	*/
	public function addWater($dstimg,$config=array()){
		$config['dstimg']=$dstimg;
		if(!isset($config['warterpos'])){
			$config['warterpos']=WATER_POS;
		}
		if(!isset($config['img'])){
			$config['img']=WATER_IMG;
		}
		if(!isset($config['str'])){
			$config['str']=WATER_STR;
		}
		if(!isset($config['size'])){
			$config['size']=WATER_SIZE;
		}
		if(!isset($config['type'])){
			$config['type']=WATER_TYPE;
		}
		
		
		$this->loadClass("image");
		$this->image->addwater($config);
	}
		
}
?>